home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_11
/
8n11051a
< prev
next >
Wrap
Text File
|
1990-09-16
|
443b
|
17 lines
int msqid; /* Message queue identifier */
key_t key=0x1024; /* Name of message queue */
/* Obtain a message queue identifier. If the
* message queue doesn't exist, create it.
*/
if ((msqid=msgget(key, 0660 | IPC_CREAT)) == -1) {
/* The perror(3C) function prints the
* text of the error number contained
* in the external integer errno.
*/
perror("msgget() failed: ");
return(-1);
}